using System.Diagnostics;
using System.Runtime.CompilerServices;

namespace ConsoleApp1;

public class CallerInfo
{
    [Conditional("DEBUG")]
    public static void DoProcessing()
    {
        TraceMessage("Something happened");
    }

    public static void TraceMessage(string message,
        [CallerMemberName] string memberName = "",
        [CallerFilePath] string sourceFilePath = "",
        [CallerLineNumber] int sourceLineNumber = 0)
    {
        Trace.WriteLine("message: " + message);
        Trace.WriteLine("member name: " + memberName);
        Trace.WriteLine("source file path: " + sourceFilePath);
        Trace.WriteLine("source line number: " + sourceLineNumber);
    }
}

[Obsolete("removed")]
public class TradeData
{
    private string name;

    public TradeData(string name)
    {
        name = name ?? throw new ArgumentNullException(nameof(name));
    }
}